import request from '@/utils/request'

// 获取-分页查询角色列表
export const getRoleList = params => request.get('/sys/role', { params })

// 分配-员工-角色
export const assignRole = (data) => request.put('/sys/user/assignRoles', data)

// // 分配权限-角色
// export const assignPrem = (data) => request.put('/sys/role/assignPrem', data)

// 获取已启用角色列表
export const getEnabledList = () => request.get('/sys/role/list/enabled')

// 新增-角色
export const addRoleList = data => request.post('/sys/role', data)

// 编辑-角色
export const updataRole = data => request.put(`/sys/role/${data.id}`, data)

// 删除-角色
export const delRole = id => request.delete(`/sys/role/${id}`)


// 
export const getPermissById = (id) => request.get(`/sys/role/${id}`)